<template>
    <view class="basic-container"  @click="tourl('/pages/order/orderinfo?id='+item.id)">
	   <view class="list">
		   <view class="label" style="color: #AAAAAA;font-weight: 400;"> {{item.orderCode}} </view>
			<view class="txt">
				 
				<text style="color: #AAAAAA;font-weight: 400;">订单详情</text>
				 <u-icon name="arrow-right" size="10"></u-icon>
			</view>
	   </view>
	   
		<view class="list">
			<view class="label">订单状态 </view>
			<view class="txt">
				<text class="content" style="color: #FF533B;" v-if="item.orderStatus==0">待付款</text>
				<text class="content" style="color: #FF533B;"  v-else-if="item.orderStatus==1">已发布</text>
				<view  v-else-if="item.orderStatus==2">
					<text class="content" style="color: green;">{{item.orderSubStatus | statusStr}}</text>
				</view>
				
				<text style="color: #999;" v-else-if="item.orderStatus==3">售后</text>
				<text style="color: #999;" v-else-if="item.orderStatus==4">售后中</text>
				<text style="color: #999;" v-else-if="item.orderStatus==5">售后完成</text>
				<text style="color: #999;" v-else-if="item.orderStatus==6">已完成</text>
				<text style="color: #999;" v-else-if="item.orderStatus==7">已取消</text>
				<text style="color: #999;" v-else>{{item.orderStatus}}</text> 
				 
		   </view>
		</view>
		<view class="list">
			<view class="label">服务项目 </view>
			<view class="txt">
				<text class="content">{{ item.categoryName || "-" }}</text>
		   </view>
		</view>
		<view class="list">
			<view class="label">服务日期 </view>
			<view class="txt">
				<text class="content" v-if="item.type==1">{{item.serviceStartTime}}/{{item.serviceEndTime}}  {{item.serviceDate || ''}}</text>
				<text class="content" v-else-if="item.type==3">{{item.serviceStartTime}}/{{item.serviceEndTime}}</text>
				<text class="content" v-else>{{item.serviceStartTime}}{{item.serviceDate || ''}}</text>
		   </view>
		</view>
		
		<view class="list" v-if="item.type==3">
			<view class="label">时间周期 </view>
			<view class="txt">
				<text class="content" >{{item.days || ''}}</text>
		   </view>
		</view>
		<view class="list" v-if="item.type==3">
			<view class="label">休息时间 </view>
			<view class="txt">
				<text class="content" >{{item.restDays || ''}}</text>
		   </view>
		</view>
		
		
		
		<view class="list" v-if="item.type==2">
			<view class="label">数量(台) </view>
			<view class="txt">
				<text class="content" >{{item.num || ''}}</text>
		   </view>
		</view>
		<view class="list" v-if="item.type==1">
			<view class="label" >服务时间 </view>
			<view class="txt">
				<text class="content">{{item.timeCycle}}   &nbsp;&nbsp;
				<text v-if="item.serviceSection">  {{ item.serviceSection || "-" }}小时</text>
				</text>
		   </view>
		</view>
		<view class="list">
			<view class="label">服务地址 </view>
			<view class="txt">
				<text class="content">{{item.areaAddress}}{{item.receiverDetailAddress}}</text>
		   </view>
		</view>
		<view class="list">
			<view class="label">工具使用 </view>
			<view class="txt">
				<text class="content">{{item.toolUsage}}</text>
		   </view>
		</view>
		<view class="list">
			<view class="label">预计结算 </view>
			<view class="txt">
				<text class="content">{{item.workingHours}}</text>
		   </view>
		</view>
		<view class="list">
			<view class="label">联系人 </view>
			<view class="txt">
				<text class="content">{{item.receiverName}} {{item.receiverMobile}}</text>
		   </view>
		</view>
    </view>
</template>
<script>

export default {
    props: {
        item: {
            type: Object,
            default: () => {},
            
        }
    },
	filters:{
		statusStr(val){
			if(val>=0 && val<=12){ 
				let obj={
					"0":"已出发",
					"1":"已到达",
					"2":"已结束",
					"4":"待服务",
					"5":"拒单",
					"6":"转单申请",
					"7":"取消申请",
					"11":"修改申请",
					"12":"已开始",
				}
				
				return obj[val+'']
			}else{
				val
			}
			
		}
	},
    data() {
        return {
            
        }
    }
}
</script>
<style scoped lang="scss">
.basic-container {
    padding: 15px;
    background-color: #fff;
	border-radius:10rpx ;
	margin-top: 20rpx;
    .list {
        display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 15rpx 0;
		.label{
			width: 180rpx;
			font-weight: bold;
			font-size: 28rpx;
			color: #333333;
		}
		.txt{
			display: flex;
			width: 100%;
			justify-content: flex-end;
			text{
				font-weight: bold;
				font-size: 28rpx;
				color: #333333;
			}
			.content{
				text-align: right;
			}
		}
    }
	 
}
</style>
